package functional;

import java.util.function.Consumer;

public class Demo3 {
    public static void main(String[] args) {
//        Consumer<String> objectConsumer = new Consumer<String>() {
//            @Override
//            public void accept(String o) {
//                System.out.println(o);
//            }
//        };

//        Consumer<String> objectConsumer = (a)->{System.out.println(a);};
        Consumer<String> objectConsumer = (a)-> System.out.println(a);

        objectConsumer.accept("acceptThis");
    }
}
